#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main(int argc,char *argv[]){
    int fds[2];
    char buf[100];
    int len;
    pipe(fds);
    fgets(buf,100,stdin);
    len = strlen(buf);
    write(fds[1],buf,len);
    char buf2[100];
    read(fds[0],buf2,100);
    write(1,buf2,strlen(buf2));
    return 0;
}